package com.yn.xgame.logic.player;

import java.util.Date;
import java.util.UUID;

import com.yn.xgame.pb.GateClientProto;

public class UserBankAssetsLog {
    private String al_id;
	private int user_id;// 玩家ID
	private int al_type;// 类型 1 存入银行 2 从银行取出
	private String al_gold;// 转移金币数，比如存入银行则为：+100，从银行取出则为：-100
	private String al_bankGold;// 存入或取出后银行剩余金币数
    private Date al_created;
	
    public UserBankAssetsLog() {
		al_id=UUID.randomUUID().toString().replaceAll("-", "");
	}

	public int getUser_id() {
		return user_id;
	}

	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}
	public String getAl_id() {
		return al_id;
	}

	public void setAl_id(String al_id) {
		this.al_id = al_id;
	}

	public int getAl_type() {
		return al_type;
	}

	public void setAl_type(int al_type) {
		this.al_type = al_type;
	}

	public String getAl_gold() {
		return al_gold;
	}

	public void setAl_gold(String al_gold) {
		this.al_gold = al_gold;
	}

	public String getAl_bankGold() {
		return al_bankGold;
	}

	public void setAl_bankGold(String al_bankGold) {
		this.al_bankGold = al_bankGold;
	}

	public Date getAl_created() {
		return al_created;
	}

	public void setAl_created(Date al_created) {
		this.al_created = al_created;
	}

	@Override
	public String toString() {
		return "UserBankAssetsLog [user_id=" + user_id + ", al_type=" + al_type + ", al_gold=" + al_gold
				+ ", al_bankGold=" + al_bankGold + ", al_created=" + al_created + "]";
	}

	public GateClientProto.UserBankAssetsLogResp.UserBankAssetsLog build(){
		return GateClientProto.UserBankAssetsLogResp.UserBankAssetsLog.newBuilder()
				.setAlType(al_type).setAlBankGold(al_bankGold).setAlGold(al_gold)
				.setAlCreated(al_created+"")
				.build();
    	
    }
}
